/*
 * Public Credit Information Sharing Platform(PCISP).
 * Copyright (c) 2019-2020 jsxzkingdee and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * Please visit https://www.zhengxinsoft.com if you need additional information or have any questions.
 */

package com.platform.comm.jwt;

/**
 * Description: JWT Token 存储接口
 *
 * @author libin created on 2020/5/14.
 */
public interface JwtTokenStorage {
    /**
     * Put string.
     *
     * @param token  the jwt entity
     * @param userId the user id
     * @return the string
     */
    String put(String token, String userId);

    /**
     * Expire.
     *
     * @param userId the user id
     */
    void expire(String userId);

    /**
     * Refresh string.
     *
     * @param token  the jwt entity
     * @param userId the user id
     * @return the string
     */
    String refresh(String token, String userId);

    /**
     * Get.
     *
     * @param userId the user id
     * @return the string
     */
    String get(String userId);
}
